﻿<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:b="clr-namespace:Corina.Interactivity.Win.Behaviours;assembly=Corina.Interactivity.Win"
      xmlns:localViewmodel="clr-namespace:Corina.Win.ServerHub.Viewmodels;assembly=Corina.Win.ServerHub"
      FontSize="14">
    <Page.DataContext>
        <localViewmodel:RunlogViewmodel />
    </Page.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBox IsReadOnly="True"
                 Text="{Binding Content,
                                Mode=OneWay}"
                 TextBlock.LineHeight="25"
                 TextBlock.LineStackingStrategy="BlockLineHeight"
                 TextWrapping="Wrap"
                 b:TextBoxBehaviour.ScrollOnTextChanged="True" />
        <StackPanel Grid.Row="1"
                    Margin="0,12,0,0"
                    HorizontalAlignment="Right"
                    Orientation="Horizontal">
            <Button Margin="12,0"
                    Command="{Binding ExportCommand,
                                      Mode=OneWay}"
                    Content="导出到文本" />
            <Button Command="{Binding CleanCommand}" Content="清空记录" />
        </StackPanel>
    </Grid>
</Page>